<?php
/**
 * 项目验证
 */

namespace app\index\validate;

class ProjectValidate extends BaseValidate {
    protected $rule = [
        'name'     => 'require',
        'username'     => 'require',
        'project_id'     => 'require',
        'user_id'     => 'require',
    ];

    protected $message=[
        'name' => '请输入项目名称',
        'username' => '请输入用户名',
        'project_id' => '参数project_id不能为空',
        'user_id' => '参数user_id不能为空',
    ];

     protected $scene = [
        'createProject'  =>  ['name'],
        'queryDeveloper'  =>  ['username'],
        'addDeveloperToProject'  =>  ['project_id','user_id'],
    ];
}